
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JSONP 实例</title>
</head>
<body>
    <div id="divCustomers">显示获取的数据</div>
<script type="text/javascript">
    function callbackFunction(result, methodName)
        {
            var html = '<ol>';
            for(var i = 0; i < result.length; i++)
            {
                html += '<li>' + result[i] + '</li>';
            }
            html += '</ol>';
            document.getElementById('divCustomers').innerHTML = html;
        }
</script>
<!--注意只支持get请求-->
<script type="text/javascript" src="http://www.runoob.com/try/ajax/jsonp.php?jsoncallback=callbackFunction"></script>
</body>
</html>
